<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.richinfo.mina.model.*" %>
<%@page import="com.richinfo.mina.*" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>用户列表</title>
</head>
<body>
<form name="form1" action="QueryUserInfoServlet" method="post">
				<table>
					<tr>
						<td width="168">
							用户名<input type="text" name="username"  />
						</td>
						<td width="250">
							<input name="submit" type="submit" value="查询" />
						</td>
					</tr>
				</table>

<div align="center" style="padding-top: 10px;">
 
<table border="0.5" width="80%" style="margin-left: 10%;" id="senfe">
<thead></thead>
<tbody id="group_one">
				<tr>
					<th>
						用户名
					</th>
					<th>
						更新时间
					</th>
					<th>
						状态
					</th>
					<th>
						发送次数
					</th>
					<th>
						编辑
					</th>
				</tr>
				
				<%
				if(request.getAttribute("allUser") != null){
				List<User> users = (List<User>) request.getAttribute("allUser"); for (User u : users) {%>
				<tr>
					<td align="center"><%=u.getUsername()%></td>
					<td align="center"><%=u.getUpdatetime()%></td>
					<td align="center"><%=u.getStatus()%></td>
					<td align="center"><%=u.getSendtimes()%></td>
					<td><a href="DispatchServlet?username=<%=u.getUsername()%>&action=updata">修改</a><a href="DeleteUserServlet?username=<%=u.getUsername()%>">删除</a></td>					
				</tr>
				<% }} %>
</tbody> 
</table>	
<div align = "left" style="padding-top: 10px;">
<a href="addUser.jsp">添加用户</a>
</div>

</div>
</form>
</body>
</html>